<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/



Route::group(['prefix' => 'camelredadmin'], function () {
    Route::get('code', 'admin\LoginController@code');//后台验证码
    //用户登录验证
    Route::get('login', 'admin\LoginController@showLoginForm')->name('admin.login');
    Route::post('login', 'admin\LoginController@login');
    Route::any('logout', 'admin\LoginController@logout');

    Route::group(['middleware' => 'auth.admin'], function () {

        Route::get('/', 'admin\IndexController@index');
        Route::get('systemInfo', 'admin\IndexController@systemInfo');

        Route::get('red/reds', 'admin\RedController@reds');//发红包首页
        Route::get('red/redf', 'admin\RedController@redf');//收红包首页
        Route::get('red/redfp', 'admin\RedController@redfp');//收红包首页
        Route::get('red/redft/{uid}', 'admin\RedController@redft');//发红包搜索
        Route::get('red/redst/{openid}', 'admin\RedController@redst');//收红包搜索
        Route::get('red/redstd/{fid}', 'admin\RedController@redstd');//收红包搜索
        Route::get('tui', 'admin\TixianController@tui');//退款记录

    //订单
        Route::resource('order', 'admin\OrderController');
        Route::get('order/indexp/{order_sn}', 'admin\OrderController@indexp');
        Route::post('order/trial', 'admin\OrderController@trial');//权限
        Route::get('delHc', 'admin\IndexController@delHc');//清除所有缓存

        Route::resource('member', 'admin\MemberController');
        Route::get('member/memberselect/{openid}', 'admin\MemberController@memberselect');//收红包搜索

        Route::resource('tixian', 'admin\TixianController');//后台提现记录

        Route::get('papersInfo', 'admin\LibraryController@papersInfo');

        Route::resource('complaint', 'admin\ComplaintController');//用户投诉
        Route::get('mylog/{type}', 'admin\ComplaintController@myLog');//日志视图
        Route::any('logDel', 'admin\ComplaintController@logDel');//删除日志

        Route::resource('kou', 'admin\KouController');//口令
        Route::resource('fen', 'admin\FenleiController');//分类
        Route::get('userId/{status}', 'admin\IndexController@userId');//关联查询

    //审核
        Route::get('shenhe', 'admin\ShenheController@index');
        Route::get('shenhe/haspass', 'admin\ShenheController@haspass');
        Route::get('shenhe/nopass', 'admin\ShenheController@nopass');
        Route::post('shenhe/pass', 'admin\ShenheController@pass');
        Route::post('shenhe/fail', 'admin\ShenheController@fail');
        Route::any('shenhe/detail/{openid}', 'admin\ShenheController@reddetail');

        Route::resource('userAuth/userAuthorities', 'admin\AuthController');//用户权限列表

        Route::resource('luckmoney', 'admin\luckmoneyController');//用户权限列表
	
	Route::resource('luckmoney', 'admin\luckmoneyController');// 拆红包
        Route::post('luckmoney/changeState', 'admin\luckmoneyController@changeState');// 拆红包

        Route::any('upload', 'admin\UploadController@upload');//上传图片

    });

});
